package com.quan.TemplateEditor.dao;

import com.quan.TemplateEditor.dto.AtrributeDefSelectorDto;
import com.quan.TemplateEditor.entity.GisTable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public interface IGisTableDao  extends JpaRepository<GisTable, String>, JpaSpecificationExecutor<GisTable> {

    @Query(value = "SELECT name FROM sqlite_master WHERE type='table'",nativeQuery = true)
    List<Map<String, Object>> findTableInfo();

    @Query(value = "SELECT * FROM SYS_GISTABLE",nativeQuery = true)
    List<GisTable> getAttributeSelector();
}
